

@extends('layouts.master')

@section("css")
		@parent
@stop

@section("body")
<div class="row">
	<div class="col-md-12">
		<!-- BASIC TABLE -->
		<div class="panel">
			<div class="panel-heading">
				<h3 class="panel-title">用户列表</h3>
			</div>
			<div class="panel-body">
				<table class="table table-hover">
					<thead>
						<tr>
							<th>编号</th>
							<th>头像</th>
							<th>昵称</th>
							<th>性别</th>
							<th>国家</th>
							<th>省份</th>
							<th>城市</th>
							<th>是否关注</th>
							<th>是否认证</th>
							<th>操作</th>
						</tr>
					</thead>
					<tbody>
							@foreach($wechatDoctors as $wechatDoctor)
							 <tr>
									 <td>{{$wechatDoctor['id']}}</td>
									 <td><img style="width: 100px;" src="{{$wechatDoctor['headimgurl']}}"></td>
									 <td>{{$wechatDoctor['nickname']}}</td>
									 <td>
											@if($wechatDoctor['sex'] == 1)
												男性
											@elseif($wechatDoctor['sex'] == 2)
												女性
											@else
												未知
											@endif
									 </td>
									 <td>{{$wechatDoctor['country']}}</td>
									 <td>{{$wechatDoctor['province']}}</td>
									 <td>{{$wechatDoctor['city']}}</td>
									 <td>{{$wechatDoctor['subscribe']?"已关注":"未关注"}}</td>
									 <td>{{count($wechatDoctor['wechatDoctorInfo'])!=0?"已认证":"未认证"}}</td>
									 <td>
											<a href="/admin/wechat-doctor/detail?id={{$wechatDoctor['id']}}">
												<div class="get_btn">查看</div>
											</a>
									 </td>
							 </tr>
							 @endforeach
					</tbody>
				</table>
			</div>
		</div>
		<!-- END BASIC TABLE -->
	</div>
</div>
<div class="row">
	<div class="list_page col-md-12">
		<div class="panel">
			<div class="panel-body">
				<div class="pages_div" style="text-align: center">
					<ul id="prePagination" class="next_pre_page pagination">
						<li><a href="{{$wechatDoctors->previousPageUrl()}}">&laquo;</a></li>
					</ul>
					<ul id="pagination" class="pagination">
						@for($i=1;$i<=ceil($wechatDoctors->total()/$wechatDoctors->perPage());$i++)
							<li style="display: none;" 
								@if($wechatDoctors->currentPage() == $i)
									class="active"
								@endif
							><a href="{{$wechatDoctors->url($i)}}">{{$i}}</a></li>
						@endfor
					</ul>
					<ul id="nextPagination" class="next_pre_page pagination">
						<li><a href="{{$wechatDoctors->nextPageUrl()}}">&raquo;</a></li>
					</ul>
					<ul class="pagination">
						<li>
							<a href="#">共{{$wechatDoctors->total()}}条记录</a>
						</li>
					</ul>
				</div>
				<div class="page_hide">
					<!-- 数据总数 -->
					<input id="totle_page" type="hidden" name="" value="{{$wechatDoctors->total()}}">
					<!-- 每页显示数据条数 -->
					<input id="per_page" type="hidden" name="" value="{{$wechatDoctors->perPage()}}">
					<!-- 当前页 -->
					<input id="current_page" type="hidden" name="" value="{{$wechatDoctors->currentPage()}}">

					<input id="previous_page_url" type="hidden" name="" value="{{$wechatDoctors->previousPageUrl()}}">

					<input id="next_page_url" type="hidden" name="" value="{{$wechatDoctors->nextPageUrl()}}">
				</div>
			</div>
		</div>
	</div>
</div>

@stop

@section("js")
		@parent
		<script type="text/javascript" src="/js/pages/admin/public/page.js"></script>
@stop
